package com.example.restaurant.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.restaurant.model.Dish;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.restaurant.service.dto.FeiDishDto;
import com.example.restaurant.service.dto.SelDishByStoreIdAndName;
import com.example.restaurant.service.dto.SelDishTypeByUserId;
import com.example.restaurant.service.dto.SelStoreByUidDto;
import com.example.restaurant.service.param.AddDishsParam;
import com.example.restaurant.service.param.UpdateDishByIdParam;

import java.util.List;

/**
 * <p>
 * 菜品表 服务类
 * </p>
 *
 * @author x
 * @since 2022-09-29
 */
public interface DishService extends IService<Dish> {

    //新增菜品
    boolean addDish(AddDishsParam addDishParam);

    //    //查询菜品
    IPage<FeiDishDto> getDish(Integer userId, int current, int size);
//    DishDto getDish(int userId, int current, int size);

    //修改菜品
    boolean updateDish(UpdateDishByIdParam updateDishByIdParam);

    //删除菜品
    boolean deleteDish(int dishId);

    //预加载新增菜品的下拉框，门店
    List<SelStoreByUidDto> selStoreByUid(int userId);

    //预加载新增菜品的下拉框，菜类
    List<SelDishTypeByUserId>  selDishTypeByUserId(int userId);

    //据门店id和模糊菜品名,模糊查询菜品
    Page<Dish> selDishByStoreIdAndName(int storeId, String dishName, int current, int size);
    //获取菜品信息
    List<Dish> getDishByDishTypeId(int dishTypeId);
    //用户通过点击菜类查菜品
    List<Dish> getAllDishByType(int storeId,int dishTypeId);
    //用户查询菜名
    List<Dish> getAllDishByName(int storeId,String dishName);
    //初始化用户菜单
    List<Dish> getAllDish(int storeId);

    //查询菜品
    IPage<FeiDishDto> getDishByStoreAndName(int storeId,String dishName,int current,int size);

}
